home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / Util / Pm-Pz / POSTSCRIPT1 < prev    next >
Encoding:
Text File  |  1987-01-10  |  8.8 KB  |  441 lines  |  [TEXT/MSWD]

  1.  
  2.      
  3. % SNT.16.PIANO (grand piano)
  4. % ..........
  5.  
  6.   
  7. % Always print with a left margin value of zero!
  8.  
  9.   
  10. clear initgraphics
  11.       
  12. % Is Palatino-Italic available on your machine?
  13.  
  14. FontDirectory /Palatino-Italic known true eq {/blurbfont
  15. {/Palatino-Italic} def /blurbfontbold {/Palatino-BoldItalic}
  16. def}{/blurbfont {/Times-Italic} def/blurbfontbold
  17. {/Times-BoldItalic} def}ifelse
  18.  
  19. % ...
  20.  
  21. /header 
  22. (Lancaster, Show & Tell, Example #16
  23. ____________________________) def
  24.  
  25.  
  26. /figtitle (Example sixteen --
  27. ) def
  28.  
  29. /blurb1
  30.  
  31. (No postscript show and tell could possibly be
  32. complete without a grand piano!
  33. ) def
  34.  
  35. /blurb2
  36.  
  37. (This is done in the highly conservative art
  38. style of a "printer's tradesman cut" and might
  39. be used for custom business cards.
  40. ) def
  41.  
  42. /filljustify false def
  43. /specialkern 0.30 def
  44.  
  45.  
  46. %............
  47.  
  48. % lj: xpos ypos linewidth (line string) lj.
  49.  
  50.  
  51. /lj{/textstring exch def /endoline exch def /ystart
  52. exch def /xstart exch def /endoline endoline xstart add def 
  53. textstring stringwidth pop /printwidth
  54. exch def endoline printwidth sub xstart sub /justlength
  55. exch
  56. def /searchstring textstring def /spacecount 0 def
  57. /wordbreak
  58. ( ) def{searchstring wordbreak search{pop pop /searchstring
  59. exch def /spacecount spacecount 1 add def}{exit}ifelse}loop  
  60. spacecount 0 eq{/spacecount 1 def}if filljustify false eq
  61. {/justlength 0 def}if justlength spacecount div /stretch
  62. exch def
  63. xstart ystart moveto stretch 0 32 specialkern 0
  64. textstring awidthshow clear}def
  65.  
  66. %....
  67.  
  68. % pj: define font, xpos, ypos, yinc. then (strings) pj
  69.  
  70. /leadspace{/space ( ) def /spacecount 0 def{linestring
  71. space anchorsearch
  72. {/spacecount spacecount 1 add def pop /linestring exch def}
  73. {pop exit}
  74. ifelse}loop xpos ypos moveto spacecount{space show}repeat
  75. /widthadjust currentpoint pop xpos sub def}def
  76.  
  77. /pj{/workstring exch def/cr (
  78. ) def /linestring ( ) def /lastparline{gsave leadspace
  79. /ypos ypos yinc sub
  80. def linestring show grestore}def /midparline {gsave
  81. leadspace currentpoint
  82. linewidth widthadjust sub linestring lj /ypos ypos yinc
  83. sub def grestore}def
  84. {workstring cr search{/linestring exch def pop /workstring
  85. exch def
  86. midparline}{/linestring exch def lastparline exit}ifelse}
  87. loop}def
  88.  
  89. %.....
  90.  
  91. blurbfontbold findfont [12 0 0 12 0 0] makefont
  92. setfont
  93.  
  94. /filljustify false def
  95. /xpos 60 def
  96. /ypos 760 def
  97. /linewidth 400 def
  98. /yinc 9 def
  99. header pj
  100.  
  101. /yinc 14 def
  102. blurbfontbold findfont [12 0 0 12 0 0] makefont
  103. setfont
  104.  
  105. /filljustify false def
  106. /ypos 160 def
  107. % has special kern routine
  108. figtitle pj
  109.  
  110. blurbfont findfont [13 0 0 13 0 0] makefont setfont
  111.  
  112. blurb1 pj
  113. blurb2 pj
  114.  
  115. % ///// FIRST INSET /////
  116.  
  117. % is der piano
  118.  
  119. save /snap exch def
  120.  
  121.     
  122. % curvetrace.p
  123. %...
  124.  
  125.  
  126. /curvetrace {/curvelist exch def tension 0 eq
  127. {/tension .000001 def} if
  128.      curvelist length 3 div 1 sub cvi /#triads exch def
  129.              /ptr 0 def firstpoint morepoint} def
  130.  
  131. /tension 2.83 def   % default value for best fit
  132. %/showtick false def % don't show points
  133. /ticklen 15 def     % length of ticks
  134. /tickhead ticklen 4 div def
  135.  
  136. /prvx { curvelist ptr 3 sub get } def
  137. /curx { curvelist ptr get } def
  138. /prvy { curvelist ptr 2 sub get } def
  139. /cury { curvelist ptr 1 add get } def
  140. /prva { curvelist ptr 1 sub get } def
  141. /cura { curvelist ptr 2 add get 180 sub} def
  142.  
  143. /showtic1 { showtick true eq {gsave currentpoint newpath
  144. translate cura
  145. 180 add rotate ticklen neg 2 div 0 moveto ticklen 0 rlineto
  146. tickhead neg
  147. dup rlineto  tickhead dup rlineto tickhead dup neg exch
  148. rlineto 0
  149. setlinewidth stroke 0 ticklen neg 2 div moveto 0 ticklen
  150. rlineto stroke 
  151. grestore} if }def
  152.  
  153. /firstpoint { curx cury moveto showtic1 /ptr ptr 3 add def
  154. }def
  155.  
  156. /morepoint {#triads { curx prvx sub dup mul cury prvy
  157. sub dup mul add sqrt
  158. tension div /zdist exch def prva cos zdist mul prvx add
  159. prva sin zdist mul
  160. prvy add cura cos zdist mul curx add cura sin zdist mul
  161. cury add
  162. curx cury
  163. curveto showtic1 /ptr ptr 3 add def} repeat} def
  164.  
  165. % ... 
  166.  
  167. % /// PIANO STARTS HERE ///
  168.  
  169. /pedals{
  170.  
  171. [276 375 -90  276 365 -90
  172. 276 365 0  305 365 0
  173. 305 365 90  305 375 90
  174. 305 375 180  276 375 180] ctf 
  175.  
  176. [297 366 -90  297 312 -90] ctb
  177. [280 366 -90  280 314 -90] cta
  178. [291 366 -90  291 312 -90] cta
  179. [293 316 55  321 345 55 ] cta
  180. [280 316 55  321 363 55 ] cta
  181. [280 354 -5  298 353 -5 ] ctd
  182.  
  183. gsave
  184. 0 5 translate
  185.  
  186. [270 307 90   270 310 90
  187. 270 310 5  278 312 5
  188. 278 312 -8  301 308 -8
  189. 301 308 -90  301 298 -90
  190. 301 298 -175  294 297 -175
  191. 294 297 90  294 302 90
  192. 294 302 170  270 307 170] ctf
  193. grestore
  194.  
  195. gsave
  196. -0.5 5 translate
  197.  
  198. [269 300 90  269 302 90
  199. 269 302 0   270 302 0
  200. 270 302 -90  270 300 -90
  201. 270 300 180  269 300 180] ctf
  202.  
  203. grestore
  204.  
  205. gsave
  206. 6 3.9 translate
  207.  
  208. [269 300 90  269 302 90
  209. 269 302 0   270 302 0
  210. 270 302 -90  270 300 -90
  211. 270 300 180  269 300 180] ctf
  212.  
  213. grestore
  214. gsave
  215. 10.5 2.9  translate
  216. [269 300 90  269 302 90
  217. 269 302 0   270 302 0
  218. 270 302 -90  270 300 -90
  219. 270 300 180  269 300 180] ctf
  220.  
  221. grestore
  222.  
  223. gsave
  224. 0.5 6 translate
  225. [284 296 90  284 299 90
  226. 284 299 -1  289 298 -1
  227. 289 298 -90  289 295 -90
  228. 289 295 1  284 296 1] ctf
  229. grestore
  230.  
  231. [276 306 -1  289 304 -1] ctb
  232. [289 302 1  295 303 1] ctb
  233. } def
  234.  
  235. /legs{
  236.  
  237. [355 372 -90  355 367 -90
  238. 355 367 180  328 296 -90
  239.  
  240. 328 296 0  330 296 0
  241. 330 296 -92  328 285 -92
  242. 328 285 180  320 285 180
  243. 320 285 92  318 296 92
  244. 318 296 0  320 296 0
  245.  
  246. 321 296 90  296 367 180
  247. 296 367 90  296 372 90
  248. 296 372 0  355 372 0] ctf
  249.  
  250. [370 377 -90  370 372 -90
  251. 370 372 180  310 372 180
  252. 310 372 5  370 377 5] ctf
  253.  
  254. newpath
  255. 324 280 2.8 2.8 360 arc closepath  
  256. 0 setgray 1 setlinewidth stroke
  257.  
  258. %....leg 2...
  259.  
  260. gsave
  261. 0.7 dup scale
  262. 300 180 translate
  263.  
  264. [355 372 -90  355 367 -90
  265. 355 367 180  328 296 -90
  266.  
  267. 328 296 0  330 296 0
  268. 330 296 -92  328 285 -92
  269. 328 285 180  320 285 180
  270. 320 285 92  318 296 92
  271. 318 296 0  320 296 0
  272.  
  273. 321 296 90  296 367 180
  274. 296 367 90  296 372 90
  275. 296 372 0  355 372 0] ctf
  276. newpath
  277.  
  278. 324 280 2.8 2.8 360 arc closepath  
  279. 0 setgray 1 setlinewidth stroke
  280. grestore
  281.  
  282. %....leg 3...
  283.  
  284. gsave
  285. 0.74 dup scale
  286. 0 145 translate
  287.  
  288. [355 372 -90  355 367 -90
  289. 355 367 180  328 296 -90
  290.  
  291. 328 296 0  330 296 0
  292. 330 296 -92  328 285 -92
  293. 328 285 180  320 285 180
  294. 320 285 92  318 296 92
  295. 318 296 0  320 296 0
  296.  
  297. 321 296 90  296 367 180
  298. 296 367 90  296 372 90
  299. 296 372 0  355 372 0] ctf
  300. newpath
  301.  
  302. 324 280 2.8 2.8 360 arc closepath  
  303. 0 setgray 1 setlinewidth stroke
  304. grestore
  305. clear
  306. } def
  307.  
  308. /lidandbody{
  309.  
  310. [290 442 45  367 522 45
  311. 367 522 -2  410 520 -2
  312. 410 520 -135  385 494 -135
  313.  
  314. 385 494 -55  
  315. 387 490 -23    472 465 -130    405 419 -155] ctf
  316.  
  317. %..body..
  318.  
  319. [405 419 0  467 420 0
  320. 467 420 -90   467 385 -90
  321. 467 385 -175   300 372 -175
  322. 300 372 90  300 447 90] ctf
  323.  
  324. } def
  325.  
  326. /keyboard {
  327.  
  328. [300 372 177  207 379 177
  329. 207 379 90  207 393 90
  330. 207 393 20          225 407 75
  331. 225 407 180   221 407 180
  332. 221 407 90   221 417 90
  333. 221 417 -1   256 418 2
  334. 256 418 70    268 440 5   314 430 -120   303 412 -120] ctf
  335.  
  336. %...whites...
  337. 1 setgray 1 setlinewidth
  338.  
  339. % lid
  340.  
  341. [292 442 45  365 519 45 
  342. 365 519 7  391 512 -75 
  343. 392 512 90  391 510 110 368 515 -178
  344. 368 515 -135  298 442 -135  
  345. 298 442 180 292 442 180] ctfd
  346. [389 514 -75  385 495 -70] ctc 
  347.  
  348. } def
  349.  
  350. /support{
  351. [355 497 45  360 503 45
  352. 360 503 -75  385 420 -75
  353. 385 420 180  379 420 180
  354. 379 420 106  355 497 106] ctfd
  355.  
  356. [387 421 0  395 421 0
  357. 395 421 -95  394 392 -105  383 380 -150
  358. 383 380 88  387 397 90  387 420 90] ctfd 
  359.  
  360. %..right arm..
  361.  
  362. [312 405 -110  308 390 -130  302 386 -170   
  363. 303 385 -5  312 388 50    318 405 71
  364. 318 405 180  312 405 180] ctfd
  365. [304 373 90   304 384 90] ctc
  366.  
  367. [308 412 0  313 412 0
  368. 313 412 -90  313 405 -90
  369. 313 405 180  308 405 180
  370. 308 405 90  308 412 90] ctfd
  371.  
  372. %..left arm
  373.  
  374. [222 415 0  227 415 0
  375. 227 415 -90  227 408 -90
  376. 227 408 180  222 408 180
  377. 222 408 90  222 415 90] ctfd 
  378.  
  379. [211 394 20   226 406 75
  380. 226 406 0  230 406 0
  381. 230 406 -95  211 394 180] ctfd
  382. } def
  383.  
  384. /keyboardwhite{
  385.  
  386. [219 385 177  298 378 177
  387. 298 378 90  298 386 90
  388. 298 386 -3  219 392 -3
  389. 219 392 -90  219 385 -90] ctfd
  390.  
  391. [280 378 -3  295 377 -3] ctc
  392.  
  393. %music stand/lid
  394.  
  395. [375 415 5  307 417 5
  396. 307 417 -120  304 412 -120
  397. 304 412 4    375 415 4] ctfd
  398.  
  399. % music stand
  400. [310 440 -15  315 431 -120   303 413 -120] ctc
  401. grestore
  402. clear} def
  403.  
  404. /piano {
  405.  
  406. 1 setlinecap
  407. 1 setlinejoin
  408. /tension 2.8 def
  409.  
  410. /ctf {curvetrace gsave 0 setgray fill grestore
  411. 1 setlinewidth 0 setgray stroke}def
  412.  
  413. /ctfd {curvetrace gsave 1 setgray fill grestore
  414. 1 setlinewidth 0 setgray stroke}def
  415.  
  416. /ct {curvetrace stroke} def
  417. /cta {curvetrace 7 setlinewidth stroke} def
  418. /ctb {curvetrace 2 setlinewidth stroke} def
  419. /ctc {curvetrace 1 setgray stroke} def
  420. /ctd {curvetrace 4 setlinewidth stroke} def
  421.  
  422. %/showtick true def
  423. /showtick false def
  424.  
  425. gsave
  426. -100 -60 translate 1.2 dup scale
  427.  
  428. pedals
  429. legs
  430. lidandbody
  431. keyboard
  432. support
  433. keyboardwhite
  434.  
  435. } def
  436.  
  437. piano
  438.  
  439. showpage 
  440.